package com.lbssoft.datalink.sync;

import com.alibaba.fastjson.JSON;
import com.lbssoft.datalink.model.Result;
import com.lbssoft.datalink.util.Constant;
import com.lbssoft.datalink.util.HttpClientUtil;

import java.util.Map;

public class PermisService {
	String appsecret;
	 public PermisService(String appsecret){
		 this.appsecret = appsecret;
	}

	public Result link(Map<String,Object> map) {
		return HttpClientUtil.sendHttpPostJson(Constant.SERVER_CONTEXT_URL+"/permission",appsecret, JSON.toJSONString(map));
	}

	public Result unLink(Map<String,Object> map) {
		return HttpClientUtil.sendHttpDelete(Constant.SERVER_CONTEXT_URL+"/permission",appsecret,JSON.toJSONString(map));
	}



}
